package com.hujf.flink.DataStreamAPI;

import com.hujf.flink.ch05.ClickSource;
import com.hujf.flink.ch05.Event;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Author hujf
 * @Date 2022/3/24 17:26
 * @Description TODO
 */
public class SourceTest {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnvironment();
        environment.setParallelism(1);
        DataStreamSource<Event> eventDataStreamSource = environment.addSource(new ClickSource());
        eventDataStreamSource.print();
        environment.execute();
    }
}
